package com.dalianpai.gulimall.gulimallauthserver.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author WGR
 * @create 2020/7/14 -- 16:33
 */
@Configuration
public class GulimallWebConfig implements WebMvcConfigurer {
    /**
     *     @GetMapping("/login.html")
     *     public String loginPage(){
     *         return "login";
     *     }
     *     就不需要我们自己写这些空方法进行跳转了
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/reg.html").setViewName("reg");
    }
}
